<%--
  Created by IntelliJ IDEA.
  User: 竹康乐
  Date: 2022/11/10
  Time: 15:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>编辑文章</title>
    <style>
        form{
            margin: 20px auto;
            width: 80%;
            text-align: center;
        }
        h2{
            font-size: 20px;
            color: coral;
        }
        input,textarea{
            width: 100%;
            height: 30px;
            margin-top: 10px;
            border: none;
            outline: none;
            border-bottom: dimgrey solid 1px;
        }
        textarea{
            margin-top: 30px;
            height: 200px;
            border: dimgrey solid 1px;
        }
        button{
            background-color: coral;
            color: white;
            width: 80px;
            height: 30px;
            border-radius: 5px;
            font-size: 15px;
            border: white;
            margin: 20px;
        }
    </style>
</head>
<body>
<form action=${requestScope.a==null?"/article/create":"/article/update"} method="post">
    <h2>编辑文章</h2>
    <input type="text" name="id" value="${requestScope.a.id}" hidden="hidden">
    <input type="text" name="title" placeholder="文章标题" value="${requestScope.a.title}"><br>
    <input type="text" name="summary" placeholder="文章摘要" value="${requestScope.a.summary}"><br>
    <textarea name="content" placeholder="文章内容">${requestScope.a.content}</textarea><br>
    <button>提交</button>

</form>


</body>
</html>
